/* 图片素材搜索页面样式 */
.picture-container {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 120px);
}

/* 页头样式 */
.picture-header {
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

.picture-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.picture-logo .logo-icon {
    font-size: 2.5rem;
    color: #34a853;
    margin-right: 12px;
}

.picture-logo h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
    font-weight: bold;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    border: 1px solid #dfe1e5;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    padding: 8px 16px;
    margin: 0 auto 20px;
    transition: box-shadow 0.3s;
}

.search-box:hover,
.search-box:focus-within {
    box-shadow: 0 1px 8px rgba(32, 33, 36, 0.4);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202124;
    padding: 8px 0;
}

.search-box button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 8px;
    color: #34a853;
    font-size: 18px;
}

/* 加载状态样式 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    width: 100%;
    color: #5f6368;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #34a853;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误消息样式 */
.error-message {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 15px;
    border-radius: 8px;
    background-color: #fdeaea;
    color: #d93025;
    text-align: center;
}

/* 搜索结果样式 */
.image-results {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.results-info {
    color: #70757a;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #5f6368;
    font-size: 16px;
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 1200px;
}

.image-item {
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    aspect-ratio: 1;
}

.image-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.image-thumbnail {
    height: 75%;
    overflow: hidden;
    position: relative;
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-item:hover .image-thumbnail img {
    transform: scale(1.05);
}

.image-info {
    padding: 8px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.image-user {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.user-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.image-stats {
    display: flex;
    justify-content: space-between;
    color: #70757a;
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto;
    gap: 15px;
}

.pagination-button {
    background-color: #f1f3f4;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    color: #202124;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.pagination-button:hover:not(:disabled) {
    background-color: #e8eaed;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-number {
    color: #70757a;
    font-size: 14px;
}

/* 预览模态框 */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-preview-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    max-height: 800px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.preview-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.preview-title {
    font-size: 16px;
    color: #202124;
    font-weight: 500;
}

.close-button {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #5f6368;
    cursor: pointer;
    padding: 4px;
}

.preview-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #f8f9fa;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.nav-button {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 16px;
    color: #202124;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.nav-button.prev {
    left: 10px;
}

.nav-button.next {
    right: 10px;
}

.preview-footer {
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.image-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.detail-item {
    color: #5f6368;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.download-button {
    background-color: #34a853;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.download-button:hover {
    background-color: #2e8f49;
}

/* 长按菜单 */
.long-press-menu {
    position: fixed;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    overflow: hidden;
}

.menu-item {
    padding: 10px 15px;
    font-size: 14px;
    color: #202124;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover {
    background-color: #f1f3f4;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .image-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .picture-container {
        padding: 15px;
    }
    
    .picture-logo .logo-icon {
        font-size: 2rem;
    }
    
    .picture-logo h1 {
        font-size: 1.5rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-thumbnail {
        height: 110px;
    }
    
    .pagination {
        gap: 8px;
    }
    
    .pagination-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .image-preview-container {
        width: 95%;
        height: 90vh;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .image-grid {
        /* grid-template-columns: repeat(1, 1fr); */
        gap: 16px;
    }
    
    .nav-button {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .image-details {
        gap: 10px;
    }
    
    .detail-item {
        font-size: 12px;
    }
    
    .download-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .image-preview-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
} 